<?php


namespace app\api\controller;

use app\api\model\Bank as Bankmodel;
use app\api\model\BankSub as BankSubModel;
class Bank extends Controller
{
    /**
     * 获取可用银行列表
     * @return array
     */
    public function lists(){
        $modle = new Bankmodel();
        $list = $modle->getList();
        return $this->renderSuccess(compact('list'));
    }

    /**
     * @param $areaid  市级-地区编号
     * @param $bankid  所选银行编号
     * @return array
     * @throws \app\common\exception\BaseException
     */
    public function sublists($areaid,$bankid){
        $model = new BankSubModel();
        $list = $model->lists($areaid,$bankid);
        return $this->renderSuccess(compact('list'));
    }
}